namespace CodeStory.WebControls
{
	/// <summary>
	/// This interface was used to provide data for hierarchy data source/view.
	/// To explain this interface,I will take the data below for example.
	/// <code>
	/// ROOT
	///	  |__FIRST
	///        |__X
	///   |__SECOND
	///        |__A
	///        |__B
	/// </code>
	/// </summary>
	public interface IHierarchyDataSelector {
		/// <summary>
		/// This method return the children of the node.
		/// </summary>
		/// <param name="path">The node path.</param>
		/// <returns></returns>
		/// <remarks>
		/// eg.
		/// path="/ROOT/SECOND";
		/// you should return  "A" and "B" 's wrap objects TreeGridDataObject.
		/// TreeGridDataObject awrap = new TreeGridDataObject(AObj,"A","/ROOT/SECOND",this);
		/// </remarks>
		ITreeGridDataObject[] SelectData(string path);
		/// <summary>
		/// This method return the current node.
		/// </summary>
		/// <param name="path">The node path.</param>
		/// <returns></returns>
		/// <remarks>
		/// eg.
		/// path="/ROOT/SECOND";
		/// You should return "SECOND" 's wrap object TreeGridDataObject.and get the parent path of the SECOND object.
		/// TreeGridDataObject secondwrap = new TreeGridDataObject(SecondObj,"SECOND","/ROOT",this);
		/// </remarks>
		ITreeGridDataObject GetData(string path);
	}
}